#include<iostream>
using namespace std;
const int N = 1e6 + 10;
int p[N];
int n;
int find(int x)
{
	if (p[x] != x) {
		p[x] = find(p[x]);
	}
	return p[x];
}
int main()
{
	cin >> n;
	for (int i = 1; i < N; i++) {
		p[i] = i;
	}
	int x;
	for (int i = 0; i < n; i++) {
		cin >> x;
		int k = find(x);
		cout << k << " ";
		p[k] = k + 1;
	}
	return 0;
}
